//
// Copyright (c) 1997 Molecular Structure Corporation
//
// RESTRICTED RIGHTS NOTICE SHORT FORM (JUNE 1987)
//
// Use, reproduction, or disclosure is subject to restrictions set
// forth in Contract No. W-31-109-ENG-38 and Contract No. 
// 943072401 with the University of Chicago, Operator of
// Argonne National Laboratory.
//
// CUIPSfileSelect.h    Initial author: N. Chen           15-Jul-1997
//    This file is the header file for user interface class CUIPSfileSelect.
/*
 *
 * Copyright (C) 2014 Rigaku Americas Corporation
 *                    9009 New Trails Drive
 *                    The Woodlands, TX, USA  77381
 *
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *    * Redistributions of source code must retain the above copyright
 *      notice(s), this list of conditions and the following disclaimer.
 *    * Redistributions in binary form must reproduce the above copyright
 *      notice(s), this list of conditions and the following disclaimer in the
 *      documentation and/or other materials provided with the distribution.
 *    * Neither the name of the Rigaku Americas Corporation nor the 
 *      names of its contributors may be used to endorse or promote products
 *      derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL RIGAKU AMERICAS CORPORATION BE LIABLE 
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA OR PROFITS; OR BUSINESS INTERUPTION) HOWEVER
 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 * DAMAGE.
 *
*/ 

//
// README: Portions of this file are merged at file generation
// time. Edits can be made *only* in between specified code blocks, look
// for keywords <Begin user code> and <End user code>.
//
//////////////////////////////////////////////////////////////
//
// Header file for CUIPSfileSelect
//
//    This file is generated by Builder Xcessory 3.5.1.
//
//    This class is a user interface "component", as described
//    in "Object-Oriented Programming with C++ and OSF/Motif",
//    by Douglas Young, Prentice Hall, 1992. ISBN 0-13-630252-1
//
//////////////////////////////////////////////////////////////
#ifndef CUIPSfileSelect_H
#define CUIPSfileSelect_H
#include "UIComponent.h"

//
// Globally included information (change thru Output File Names Dialog).
//


//
// Class Specific Includes (change thru the class in Resource Editor).
//



// Begin user code block <head> 

#include "Cstring.h"
#include "CXhelp.h"

typedef void (*PSFileCallback) (XtPointer,            // Pointer to object 
				   const Cstring&,    // Filename
				   const Cstring&);   // Comment

// End user code block <head> 

class CUIPSfileSelect : public UIComponent
{

  public:

    CUIPSfileSelect(const char *, Widget);
    CUIPSfileSelect(const char *);
    virtual ~CUIPSfileSelect();
    virtual void create(Widget);
    const char *const  className();
    
    // Begin user code block <public> 

      XtPointer       m_pObj;          // For callback, pointer to an object
      PSFileCallback  m_prvFileCallback;

      Cstring sGetFilename(void);
      Cstring sGetComment(void);
      void    vSetFilename(const Cstring&);
      void    vSetComment(const Cstring&);

    // End user code block <public> 
  protected:
    // Classes created by this class
    
    // Widgets created by this class
    Widget _CUIPSfileSelect;
    Widget _form;
    Widget _lbComment;
    Widget _scrolledWindow;
    Widget _tfComment;
    
    // These virtual functions are called from the private callbacks 
    // or event handlers intended to be overridden in derived classes
    // to define actions
    
    virtual void vPSfileSelectCB(Widget, XtPointer, XtPointer);
    
    // Begin user code block <protected> 
      Cstring         m_sPSFilename;
      Cstring         m_sComment;
    // End user code block <protected> 
  private: 
    
    //
    // Default application and class resources.
    //
    static String         _defaultCUIPSfileSelectResources[];
    static UIAppDefault   _appDefaults[];
    static Boolean        _initAppDefaults;
    //
    // Callback client data.
    //
    UICallbackStruct  *_clientDataStructs;
    
    //
    // Callbacks to interface with Motif.
    //
    static void vPSfileSelectCBCallback(Widget, XtPointer, XtPointer);
    
    // Begin user code block <private> 

    Cstring m_sHelpLine;
    CXhelp *m_poXhelp;

    // End user code block <private> 
};

// Begin user code block <tail> 
// End user code block <tail> 
#endif
